<template>
  <div
    class="jy-style-height message-box"
    :style="{
      background: `rgba(33, 33, 33, 1) url(${
        publicUrls + 'free/style4/publicStyle4Bg.png' + '?imageView2/3/format/webp'
      })`,
    }"
  >
    <div class="cultural-bg">
      <div class="message-heard">
        <img class="backHome" @click="blankHome" :src="publicUrls + 'free/style4/backHome.png'" alt="" />
        <span>留言板</span>
        <div class="backHome"></div>
      </div>
      <div class="comment-box">
        <comment text="发表评论" />
      </div>
      <div class="commentList-box">
        <div class="commentNum" v-if="total !== 0">共{{ total }}条留言</div>
        <div class="commentList-box-content">
          <ScrollBox
            color="rgba(50, 43, 37, 1)"
            v-if="scrollheight"
            :byid="4235"
            :width="scrollheight"
            :scroll-src="publicUrls + 'free/style4/scrollBar.png'"
          >
            <template #solidBorderCon>
              <commentList
                @emitTotal="emitTotal"
                textColor="rgba(0,0,0,0.8)"
                bgColor="rgba(243, 255, 255, 0.6)"
                replyColor="rgba(0, 0, 0, 0.80)"
              />
            </template>
            <template #solidBorderEx>
              <div class="solidBorder-child"></div>
            </template>
          </ScrollBox>
        </div>
      </div>
    </div>
    <MenuNavigation />
    <div class="content-door">
      <i class="iconfonts">&#xe6dd;</i>
      <span>永不落幕的展览与展示平台</span>
    </div>
  </div>
</template>

<script lang="ts">
// @ts-nocheck
export default defineComponent({
  name: 'style4',
});
</script>

<script setup lang="ts">
// @ts-nocheck
import { defineComponent, ref } from 'vue';
import comment from '../messageComponent/style1/comment.vue';
import commentList from '../messageComponent/style1/commentList.vue';
import { publicUrls } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
const commonStore = commonDataStore();
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox.vue';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const router = useRouter();
const route = useRoute();
const store = useProjectStore();
const total = ref(0);
const scrollheight = ref();
let viewportHeight = window.innerHeight;
scrollheight.value = viewportHeight * 0.3288;
const blankHome = () => {
  store.menuId = null;
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
const emitTotal = (num: number) => {
  total.value = num;
};
</script>

<style scoped lang="less">
.message-box {
  width: 100%;
  padding-bottom: 0px;
  background-size: contain !important;
  background-repeat: repeat !important;
  background-position: center !important;
}
.content-door {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 60%;
  position: absolute;
  bottom: 0;
  .iconfonts {
    font-size: 26px;
    color: #83b0b3;
    margin-bottom: 4px;
    line-height: 32px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 32px;
    color: #83b0b3;
    margin-left: 20px;
    padding-bottom: 7px;
  }
}
.cultural-bg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 115px 100px;
  background: url(https://static.jiyi.show/free/style4/publicStyle4Bg-1.png) no-repeat center/100% 100%;
}
.message-heard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 24px;
  span {
    color: #5391a3;
    text-align: center;
    font-family: 'SourceHanSerifCN-Bold';
    font-size: 36px;
    line-height: 56px;
  }
  .backHome {
    cursor: pointer;
    width: 52px;
    height: 50px;
    margin-left: 0 !important;
  }
}
.comment-box {
  width: 100%;
  padding: 0 60px;
  margin-bottom: 30px;
}
.commentList-box {
  display: flex;
  flex-direction: column;
  padding: 0 60px;
  //   flex: 1;
  height: 520px;
  width: 100%;
}

.commentNum {
  width: 100%;
  height: 24px;
  font-family: PingFang SC;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  text-align: left;
  color: rgba(51, 51, 51, 1);
  margin-bottom: 30px;
}
.commentList-box-content {
  width: 100%;
  height: 100%;
  // overflow: auto;
}
.solidBorder-child {
  width: 1px;
  height: 100%;
  background: #83b0b3;
  opacity: 0.6;
}
// ::v-deep .unit-exbi-remarks-info-remarks {
// width: 100% !important;
// }
::v-deep .solid-box-parent {
  margin-right: 20px;
}
::v-deep .templatestyle1-scroll-box-tumb {
  align-items: center;
  justify-content: center;
  top: -5px;
}
.commentList-box-content::-webkit-scrollbar {
  display: none;
}
::v-deep .t-textarea__inner {
  background: #f3ffff;
  border-radius: 4px;
}
::v-deep .textarea-bottom {
  height: auto;
  margin-top: 24px;
}
::v-deep .textarea-buttom {
  font-family: SourceHanSerifCN;
  height: 36px;
  background: #b8d2d2;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
  color: #fff;
  line-height: 36px;
  padding: 0 24px;
}
::v-deep .bottom-text {
  font-size: 14px;
  color: rgba(51, 51, 51, 0.5);
  line-height: 26px;
}
::v-deep .t-textarea__inner:hover {
  border: 1px solid #f3ffff;
}
:deep(.t-avatar) {
  width: 48px !important;
  height: 48px !important;
}
::v-deep .replyContent {
  border: none;
}
::v-deep .nullheard {
  background: rgba(243, 255, 255, 0.5);
  border: none;
  color: rgba(51, 51, 51, 1);
  span {
    color: #5391a3;
  }
}
::v-deep .commentItem {
  margin-bottom: 50px;
}
::v-deep .name {
  color: rgba(51, 51, 51, 0.7);
}
::v-deep .data {
  color: rgba(51, 51, 51, 0.4);
}
::v-deep .rigth-footer {
  font-size: 17px;
  color: rgba(51, 51, 51, 1);
  margin-top: 12px;
  line-height: 32px;
}
::v-deep .templatestyle1-scroll-box-tumb {
  align-items: center;
  justify-content: center;
  img {
    width: 24px;
    height: 24px;
  }
}
</style>